// Copyright (c) 2002 Torvald Riegel. All rights reserved.
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.

package cpne;

import org.tigris.gef.graph.*;
import org.tigris.gef.graph.presentation.*;

public class PlacePort extends NetPort
{
    public PlacePort(NetNode parent)
        {
            super(parent);
        }
    protected Class defaultEdgeClass(NetPort otherPort)
        {
            try
            {
                return Class.forName("cpne.PTEdge");
            }
            catch (java.lang.ClassNotFoundException ignore) 
            {
                System.out.println("aha");
                
                return null;
            }
        }
    public boolean canConnectTo(GraphModel gm, Object otherPort)
        {
            try
            {
                return super.canConnectTo(gm, otherPort) &&
                    Class.forName("cpne.TransitionPort").isInstance(otherPort);
            }
            catch (java.lang.ClassNotFoundException ignore) 
            {
                return false;
            }
        }
}

